<?php
	class Control_Sidebar extends QUI_Control_Abstract
	{
		function render()
		{
			// 从对象注册表中查询 app 对象
			$app = Q::registry('app');
			// 取得当前用户的信息
			if(null == $app->currentUser())
			{
				$this->_view['current_user'] = null;
			}
			else
			{
                $user = $app->currentUserObject();
				$this->_view['current_user'] = $user;
                $this->_view['enter'] = $user->getEnterpriseInfo();
			}
			//获得热门用户
			//$this->_view['top_uers'] = User::find()->order('last_login_time DESC')->get(3);
			
			// 渲染视图并返回结果
			return $this->_fetchView(dirname(__FILE__) . '/sidebar_view');
		}
	}

?>